virtual bool Precompute (FXServer* server)
Overloaded to precompute or allocate any data required when the force is sampled.
Returns
false if there was an error. If so, the node is set as not-operational (for example if a
port is not filled although it is necessary for your plugin to correctly operate).
Parameters
FXServer* server:
The server this node is called from. Use it to retrieve any information you may need..
virtual bool PrecomputeMP (FXServer* server)
Overloaded to precompute or allocate any data required when the force is sampled in a multiprocessor context.
Returns
false if there was an error. If so, the node is set as not-operational (for example if a
port is not filled although it is necessary for your plugin to correctly operate).
Parameters
FXServer* server:
The server this node is called from. Use it to retrieve any information you may need..
virtual void Process (void* t_data)
Overloaded to process the main code of your force. Make sure your force supports multiprocessor execution.
Parameters
void* t_data:
You can cast this pointer to ProcessData at least:
FXAPI::ProcessData* base_data = static_cast< FXAPI::ProcessData* >(t_data);
Then depending on base_data->mode you can cast it to either ProcessDataGrids (mode==0) or ProcessDataParticles (mode==1).
This will contain additional information passed from the node that is calling your force.
virtual void FreePrecompute (void)
Overloaded to free any precomputed data (in Precompute or PrecomputeMP).